package HomeWork;

/**
 * @description:
 * @Author yyp
 * @time
 */
public class HomeWork03 {
    public static void main(String[] args) {
        Cat cat = new Cat();
        cat.shout();
        Dog dog = new Dog();
        dog.shout();
    }
}

abstract class Animal{
    public abstract void shout();
}

class Cat extends Animal{
    @Override
    public void shout() {
        System.out.println("dog wang wang");
    }
}
class Dog extends Animal{
    @Override
    public void shout() {
        System.out.println("cat miao miao");
    }
}

